-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mingw #2
Open
bscottm
wants to merge
98
commits into
jwinarske:cmake
Choose a base branch
from
bscottm:mingw
base: cmake
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mingw #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add MinGW GNU compiler support. Also update CMake minimum version, since some of the newer generator features are used.
If CMAKE_INSTALL_PREFIX defaults (not set) on initial run, nail the prefix to ${CMAKE_SOURCE_DIR}/PTHREADS-BUILT. And make sure it persists across subsequent runs. Also found a minor cleanup when setting target compile flags.
Fix GCC warning about "char *" used with immutable strings. It's also a bad idea to cast a pointer to int. Use ptrdiff_t instead.
Use PRIVATE for all target defines, libraries, options, etc. PUBLIC ends up adding extra flags to library dependents because it alters the INTERFACE and PRIVATE target properties at the same time. So, if libpthreadGC3 gets build with __PTW32_BUILD and that definition is added to the libpthreadGC3 target (target_compile_definitions) with PUBLIC, the test cases inherit the __PTW32_BUILD define. It's almost worse than using add_compile_definitions. Punchline: Localize target flags, definitions, options and libraries using PRIVATE. Note: 100% of the tests pass for GNU x64. Some fail for x86. This can be attributed to the difference in C++ exception handling. x64 uses SEH, x86 uses SJLJ.
- Generate config.h in ${CMAKE_BINARY_DIR} instead of overwriting config.h in the top-level source directory. Arrange the include directory list to ensure it gets picked up before the top-level. - Fat finger? Install tests for VC from the appropriate configuration subdirectory.
jwinarske
force-pushed
the
cmake
branch
2 times, most recently
from
July 9, 2020 14:42
08c3881
to
d0530d2
Compare
…mingw Also, workaround the new CMake source enforcement "feature", where CMake actually embeds the source type on the MSVC command line (i.e., "/TC" for C source, "/TP" for C++ source.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Renamed "gnu_compiler" branch to "mingw" (works better when using CMake's ExternalPackage_Add)